﻿Ext.namespace('iOS.App.Notes');

Ext.define('NotesBtnBar', {
    extend: 'ToolBtnBar',

    statics: {
        ToolbarBtn : 'toolbar-btn',
        ArrowBtn   : 'arrow-btn',
        RectBtn    : 'rect-btn',
        LeftBtn    : 'left-btn',
        RightBtn   : 'right-btn',
        BarTitle   : 'notes-bar-title',
        BtnContent : 'btn-content',
        BarElem    : 'bar-elem',
        CardName   : 'notes-card',
        ReplaceBtn : 'notes-replace-btn'
    },

    rightBtnCkHd: function(event){
        var that    = event.data.scope || this,
            sttc    = that.self,
            $this   = $(this),
            tarCard = $this.attr('tarcard');
        iOS.ViewManager.notify(sttc.CardName, 'changeVBCard', [tarCard]);
    },

    rplcBtnHandle: function(event){
        var that    = event.data.scope;
        that.callParent([event]);
        iOS.ViewManager.notify(that._btnCfg.cardName, 'finishEdit');
    }
});

iOS.App.Notes.NotesBtnBar = NotesBtnBar;